<!DOCTYPE html>
<!--
This is a starter template page. Use this page to start your new project from
scratch. This page gets rid of all links and provides the needed markup only.
-->
<html xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.thymeleaf.org/extras/spring-security" lang="zh-CN">
<head th:fragment="head(title)">
  <meta charset="utf-8"/>
  <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
  <title th:inline="text">新牛 OAuth2 全家桶 | [[ ${title} ]]</title>
  <!-- Tell the browser to be responsive to screen width -->
  <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport"/>
  <!-- Bootstrap 3.3.6 -->
  <link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/3.3.6/css/bootstrap.min.css" th:href="@{/webjars/bootstrap/3.3.6/css/bootstrap.min.css}"/>
  <!-- Font Awesome -->
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" th:href="@{/webjars/fontawesome/4.7.0/css/font-awesome.min.css}"/>
  <!-- Ionicons -->
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/ionicons/2.0.1/css/ionicons.min.css" th:href="@{/webjars/ionicons/2.0.1/css/ionicons.min.css}"/>
  <!-- iCheck -->
  <link rel="stylesheet" href="../../../resources/static/plugins/iCheck/all.css" th:href="@{/resources/plugins/iCheck/all.css}"/>
  <!-- Select2 -->
  <link rel="stylesheet" href="../../../resources/static/resources/plugins/select2/select2.min.css" th:href="@{/resources/plugins/select2/select2.min.css}"/>

    <!-- Theme style -->
    <link rel="stylesheet" href="../../../resources/static/resources/css/AdminLTE.min.css" th:href="@{/resources/css/AdminLTE.min.css}"/>
    <!-- AdminLTE Skins. We have chosen the skin-blue for this starter
          page. However, you can choose any other skin. Make sure you
          apply the skin class to the body tag so the changes take effect.
    -->
    <link rel="stylesheet" href="../../../resources/static/resources/css/skins/skin-blue.min.css" th:href="@{/resources/css/skins/skin-blue.min.css}"/>

  <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
  <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
  <!--[if lt IE 9]>
  <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
  <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
  <![endif]-->
</head>
<body class="hold-transition skin-blue sidebar-mini">
<div class="wrapper">

  <!-- Main Header -->
  <header class="main-header" th:fragment="main-header">

    <!-- Logo -->
    <a href="index2.html" class="logo" th:href="@{/}">
      <!-- mini logo for sidebar mini 50x50 pixels -->
      <span class="logo-mini"><b>桶</b></span>
      <!-- logo for regular state and mobile devices -->
      <span class="logo-lg"><b>OAuth2</b> 全家桶</span>
    </a>

    <!-- Header Navbar -->
    <nav class="navbar navbar-static-top" role="navigation">
      <!-- Sidebar toggle button-->
      <a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button">
        <span class="sr-only">Toggle navigation</span>
      </a>
      <!-- Navbar Right Menu -->
      <div class="navbar-custom-menu">
        <ul class="nav navbar-nav">
          <!-- User Account Menu -->
          <li class="dropdown user user-menu">
            <!-- Menu Toggle Button -->
            <a href="#" class="dropdown-toggle" data-toggle="dropdown">
              <!-- The user image in the navbar-->
                <i class="fa fa-user"></i>
              <!-- hidden-xs hides the username on small devices so only the image appears. -->
              <span class="hidden-xs"><span sec:authentication="name">Username</span></span>
            </a>
            <ul class="dropdown-menu">
              <!-- The user image in the menu -->
              <li class="user-header">
                <p><i class="fa fa-user-circle-o fa-5x"></i></p>
                <p>
                    <span sec:authentication="name">Username</span>
                  <small sec:authentication="authorities">authorities list</small>
                </p>
              </li>
              <!-- Menu Footer-->
              <li class="user-footer">
                <div class="pull-right">
                    <form th:action="@{/logout}" method="post" role="form" sec:authorize="authenticated">
                        <button class="btn btn-default btn-flat" type="submit">Sign out</button>
                    </form>
                </div>
              </li>
            </ul>
          </li>
        </ul>
      </div>
    </nav>
  </header>
  <!-- Left side column. contains the logo and sidebar -->
  <aside class="main-sidebar" th:fragment="main-sidebar">

    <!-- sidebar: style can be found in sidebar.less -->
    <section class="sidebar">

      <!-- Sidebar Menu -->
      <ul class="sidebar-menu">
        <li class="header">MENU</li>
        <!-- Optionally, you can add icons to the links -->
        <li><a href="#" th:href="@{/}"><i class="fa fa-dashboard"></i> <span>控制面板</span></a></li>
        <li><a href="#" th:href="@{/oauth/tokens}"><i class="fa fa-key"></i> <span>Token 管理</span></a></li>
        <li class="treeview">
          <a href="#"><i class="fa fa-male"></i> <span>用户与权限管理</span>
            <span class="pull-right-container">
              <i class="fa fa-angle-left pull-right"></i>
            </span>
          </a>
          <ul class="treeview-menu">
            <li><a href="#" th:href="@{/users}"><i class="fa fa-user"></i> <span>用户管理</span></a></li>
            <li><a href="#" th:href="@{/roles}"><i class="fa fa-users"></i> <span>角色管理</span></a></li>
            <!--<li><a href="#"><i class="fa fa-hand-pointer-o"></i> <span>权限管理</span></a></li>-->
          </ul>
        </li>
        <li class="treeview">
          <a href="#"><i class="fa fa-handshake-o"></i> <span>OAuth2 管理</span>
            <span class="pull-right-container">
                <i class="fa fa-angle-left pull-right"></i>
            </span>
          </a>
            <ul class="treeview-menu">
                <li><a href="#" th:href="@{/clientDetails}"><i class="fa fa-hdd-o"></i> <span>客户端管理</span></a></li>
                <li><a href="#" th:href="@{/grantTypes}"><i class="fa fa-tags"></i> <span>授权方式管理</span></a></li>
                <li><a href="#" th:href="@{/scopes}"><i class="fa fa-star"></i> <span>授权范围管理</span></a></li>
                <li><a href="#" th:href="@{/resourceIds}"><i class="fa fa-shield"></i> <span>资源 ID 管理</span></a></li>
            </ul>
        </li>
      </ul>
      <!-- /.sidebar-menu -->
    </section>
    <!-- /.sidebar -->
  </aside>

  <!-- Content Wrapper. Contains page content -->
  <div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <section class="content-header">
      <h1>
        Page Header
        <small>Optional description</small>
      </h1>
      <ol class="breadcrumb">
        <li><a href="#"><i class="fa fa-dashboard"></i> Level</a></li>
        <li class="active">Here</li>
      </ol>
    </section>

    <!-- Main content -->
    <section class="content">

      <!-- Your Page Content Here -->

    </section>
    <!-- /.content -->
  </div>
  <!-- /.content-wrapper -->

  <!-- Main Footer -->
  <footer class="main-footer" th:fragment="main-footer">
    <!-- To the right -->
    <div class="pull-right hidden-xs text-muted">
      新牛科技倾情奉献 😙 &nbsp; OAuth2 全家桶 v1.0.0
    </div>
    <!-- Default to the left -->
    <strong>Copyright &copy; 2017 <a href="http://www.newnil.com" target="_blank">Newnil</a>.</strong> All rights reserved.
  </footer>

<th:block th:fragment="control-sidebar">
  <!-- Control Sidebar -->
  <aside class="control-sidebar control-sidebar-dark">
    <!-- Empty -->
  </aside>
  <!-- /.control-sidebar -->
  <!-- Add the sidebar's background. This div must be placed
       immediately after the control sidebar -->
  <div class="control-sidebar-bg"></div>

</th:block>
</div>
<!-- ./wrapper -->

<th:block th:fragment="required-js-scripts">
<!-- REQUIRED JS SCRIPTS -->

<!-- jQuery 2.2.3 -->
<script src="https://cdn.bootcss.com/jquery/2.2.3/jquery.min.js" th:src="@{/webjars/jquery/2.2.3/jquery.min.js}"></script>
<!-- Bootstrap 3.3.6 -->
<script src="https://cdn.bootcss.com/bootstrap/3.3.6/js/bootstrap.min.js" th:src="@{/webjars/bootstrap/3.3.6/js/bootstrap.min.js}"></script>
<!-- AdminLTE App -->
<script src="../../../resources/static/resources/js/app.min.js" th:src="@{/resources/js/app.min.js}"></script>

<!-- Optionally, you can add Slimscroll and FastClick plugins.
     Both of these plugins are recommended to enhance the
     user experience. Slimscroll is required when using the
     fixed layout. -->

<!-- iCheck -->
<script src="../../../resources/static/resources/plugins/iCheck/icheck.min.js" th:src="@{/resources/plugins/iCheck/icheck.min.js}"></script>

<!-- Select2 -->
<script src="../../../resources/static/resources/plugins/select2/select2.full.min.js" th:src="@{/resources/plugins/select2/select2.full.min.js}"></script>

<script src="../../../resources/static/resources/js/site.js" th:src="@{/resources/js/site.js}"></script>
<script type="text/javascript">
  $(function () {
    $('input').iCheck({
      checkboxClass: 'icheckbox_square-blue',
      radioClass: 'iradio_square-blue',
      increaseArea: '20%' // optional
    });
    //Flat red color scheme for iCheck
    $('input[type="checkbox"].flat-red, input[type="radio"].flat-red').iCheck({
      checkboxClass: 'icheckbox_flat-red',
      radioClass: 'iradio_flat-red'
    });
    //Flat green color scheme for iCheck
    $('input[type="checkbox"].flat-green, input[type="radio"].flat-green').iCheck({
      checkboxClass: 'icheckbox_flat-green',
      radioClass: 'iradio_flat-green'
    });
    //Initialize Select2 Elements
    $(".select2").select2();
  });
function activeMenus() {
    if(arguments)
        for(var i in arguments) {
            $('ul.sidebar-menu li:contains(' + arguments[i] + ')').addClass('active');
        }
}
</script>
</th:block>
</body>
</html>
